package com.janushuang.designpattern.decorator;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author zhijing.huang
 *         Created by zhijing.huang on 2014/9/28.
 */
public class ConcreteDecorator2 extends Decorator {
    private static final Logger LOGGER = LoggerFactory.getLogger(ConcreteDecorator2.class);
    private String state;
    public ConcreteDecorator2(Component component, String state) {
        super(component);
        this.state = state;
    }
    @Override
    public void operation() {
        super.operation();
        addDecoration();
    }
    private void addDecoration() {
        LOGGER.info("add decoration in ConcreteDecorator2, state="+state);
    }
}
